<?

class Mojito_Controller_Action_Helper_File extends Zend_Controller_Action_Helper_Abstract
{
	public function rename($source)
	{
		// get the extension
		$split=explode('.',$source);
		$extension = array_pop($split);
		// reconstruct the original filename
		$filename_original = implode('.',$split);
		// create unique filename
		$filename = sha1(base_convert(time(),10,36).$source);
		return array('name'=>$filename,'original'=>$filename_original,'extension'=>$extension);
	}

}